]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
environment: Always honor easing duration settings
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Tue, 25 Nov 2025 21:48:54 +0000 (22:48 +0100)
committerMarco Trevisan (Treviño) <mail@3v1n0.net>
Thu, 27 Nov 2025 10:08:10 +0000 (11:08 +0100)
In case an actor easing is created without an explicit duration, we
should rely to the default animation that Clutter.Actor.save_easing_state()
sets to 250ms.

This fine in normal use cases, but in case the animations are disabled
the current code skips calling our Clutter.Actor.set_easing_duration()
override, and so we just end up leaving the actor easing time to 250ms,
not respecting the St settings

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3983>

js/ui/environment.js

index 5ec3a089cae4d550e0bf213567182ae0cd328b94..58114b0a778afb5a2000a23bd10d285f641dc280 100644 (file)
@@ -103,8 +103,8 @@ function _easeActor(actor, params) {
     const animationRequired = params.animationRequired;
     delete params.animationRequired;
 
-    if (params.duration !== undefined)
-        actor.set_easing_duration(params.duration, {animationRequired});
+    const duration = params.duration ?? actor.get_easing_duration();
+    actor.set_easing_duration(duration, {animationRequired});
     delete params.duration;
 
     if (params.delay !== undefined)